[stable34] fix(wopi): report a locked file as 423, not 500 - #6063
Merged
Conversation
When putContent() throws LockedException the file is locked by another operation and we have written nothing. Answering 500 says the server is broken, which it isn't, and it buries a routine, self-resolving condition in the error logs. It also misleads the editor. Collabora Online cannot tell a genuine fault from a refusal, so after the failed upload it asks for CheckFileInfo to work out whether the document in storage is still the one it knows. A 423 lets it see the upload for what it was and retry once the lock clears. 423 is what this controller already answers with when the lock manager reports a file locked in lock() and refreshLock(); use it on the write path too. Do not use 409: in WOPI that means the document changed in storage, and Collabora Online reads it that way. It would put a conflict dialog in front of the user, asking them to discard their work or overwrite a file that nobody has touched. Signed-off-by: Andras Timar <andras.timar@collabora.com>
elzody
approved these changes
Sep 9, 2026
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Backport of PR #6054